Webhook Extensions
Webhook Extensions Overview
If you need to keep products up to date automatically in your external systems, one option is using webhook extensions. Whenever a product is updated, through real time extensions, user edits, or nightly bulk updates, a call will be made to all installed webhook extensions. The call made to webhook extensions is in the same format as Export Extensions, however only one product will currently be passed.
tip
In the future, multiple products (up to 50) may be passed into export extensions when multiple products are updated. It is best to design your extension to handle this as well.
Request Format
An example of the request format is included below.
{
"additionalFields": {
"field1": "value",
"field2": "value",
"field3": "value"
},
"products": [
{
"quantity": 0.0,
"price": 0.0,
"description": "value",
"manufacturer": "value",
"manufacturerPartNumber": "value",
"msrp": 0.0,
"name": "value",
"image": "https://www.example.com/image.jpg",
"unspsc": "value",
"vendors": [
{
"cost": 0.0,
"onHand": 0.0,
"inStock": false,
"vendorPartNumber": "value",
"vendorName": "value"
}
],
"attributes": {
"field1": "value",
"field2": "value",
"field3": "value"
},
"filters: {
"field1": 0.0,
"field2": 0.0,
"field3": 0.0
},
"facets": {
"field1": "value",
"field2": "value",
"field3": "value"
},
"links": [
{
"type": "value",
"value": "value",
"recommended": true
}
],
"notes": [
{
"text": "value",
"username": "value"
}
],
"segment": "value",
"category": "value",
"subCategory": "value",
"extensionFields": [
{
"extensionId": "{YOUREXTENSIONID}"
"key": "value",
"value": "value"
}
],
"favorite": {
"user": false,
"company": true
}
}
]
}
Response Format
The extension is expected to respond with the following format.
{
"error": "value",
"success": true,
"redirectUrl": "URL",
"messageHeader": "value",
"message": "value",
"externalId": "{INTEGRATED SYSTEM ID}",
"products": [
{
"id": "{ADAPTIVE CATALOG PRODUCT ID}",
"catalog": "{ADAPTIVE CATALOG PRODUCT CATALOG NAME}",
"externalId": "{INTEGRATED SYSTEM ID}"
}
]
}
A description of the fields is included below
Field | Required | Description |
---|---|---|
error | false | A error message to be displayed to the user if success is set to false |
success | true | Boolean indicating success or failure of the extension run |
redirectUrl | false | A URL to be displayed to the user upon successful extension run. This will open in a new tab / window for the user. |
messageHeader | false | If you would like to display a custom success message, this will be displayed as the header to that message |
message | false | If you would like to display a custom success message, this will be displayed as the body to that message |
externalId | false | If the export extension should establish a workspace link, then this should contain the external system ID. |
products | false | If the export extension should establish product links, then this array should contain the information to link to your external system. |
products.id | false | The Adaptive Catalog product ID |
products.catalog | false | The name of the catalog that the product is in inside Adaptive Catalog |
products.externalId | false | The external system ID to link the product to |